package com.jt9003.service.impl;

import com.jt9003.dao.Items;
import com.jt9003.pojo.Drugs;
import com.jt9003.service.ItemsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ItemsServiceImpl implements ItemsService {
    @Resource
    private Items items;


    @Override
    public int insertItem(Drugs drugs) {
        int i=items.insertItem(drugs);
        return i;
    }

    @Override
    public int deleteItemById(int drId) {
        int i=items.deleteItemById(drId);
        return i;
    }

    @Override
    public int updateItemById(Drugs drugs) {
        int i=items.updateItemById(drugs);
        return i;
    }

    @Override
    public int updateItemStateById(Drugs drugs) {
        int i=items.updateItemStateById(drugs);
        return i;
    }

    @Override
    public List<Drugs> selectDrugsByMultipleConditions(Integer drRecuperationType, Integer drType, Integer drState,Integer start, Integer limit) {
        List<Drugs> i=items.selectDrugsByMultipleConditions(drRecuperationType, drType, drState, start, limit);
        return i;
    }

    @Override
    public int getDrugsCountByMultipleConditions(Integer drRecuperationType, Integer drType, Integer drState) {
        int i=items.getDrugsCountByMultipleConditions(drRecuperationType, drType, drState);
        return i;
    }

    @Override
    public List<Drugs> selectDrugsByNameOrPinyinInitials(String drName,String drCode, Integer start, Integer limit) {
        List<Drugs> i=items.selectDrugsByNameOrPinyinInitials(drName, drCode,start, limit);
        return i;
    }

    @Override
    public int getDrugsCountByResult(String drName,String drCode) {
        int i=items.getDrugsCountByResult(drName,drCode);
        return i;
    }

    @Override
    public List<Drugs> selectDrugsList(Integer start, Integer limit) {
        List<Drugs> i =items.selectDrugsList(start, limit);
        return i;
    }

    @Override
    public int deleteDrugsById(List<Integer> idList) {
        int i=items.deleteDrugsById(idList);
        return i;
    }

    @Override
    public int getDrugsCount() {
        int i=items.getDrugsCount();
        return i;
    }
}
